package com.gan.ganapiclient.utils;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

/**
 * @author gan
 * @date 2023/5/5 12:51
 */
public class SignUtil {
    /**
     * 使用密钥和用户信息和随机数和时间戳生成签名
     *
     * @param map
     * @param secretKey
     * @return
     */
    public static String getSign(String body, String secretKey) {
        Digester md5 = new Digester(DigestAlgorithm.SHA256);
        String content = body + "." + secretKey;
        return md5.digestHex(content);
    }


}
